<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>监控中心 - 仓库管理</title>

    <!-- Bootstrap Core CSS -->
    <link href="${request.getContextPath()}/public/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="${request.getContextPath()}/public/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="${request.getContextPath()}/public/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="${request.getContextPath()}/public/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

        <!--嵌入头部跟菜单-->
        <#include "/admin/inc/menu.html"/>

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">

                <div class="row">
                    <div class="col-lg-10">
                        <h4 class="page-header">仓库列表</h4>
                    </div>
                    <!-- /.col-lg-12 -->
                    <div class="col-lg-2">
                        <a href="${request.getContextPath()}/admin/warehouse/add.do" class="btn btn-primary page-header"> <li class="fa fa-plus"></li>  新增仓库</a>
                    </div>
                </div>
        <!-- /.row -->

                <div class="row">
                    <form action="${request.getContextPath()}/admin/warehouse/search.do">

                        <div class="col-sm-4">
                            <div id="dataTables-example_filter" class="dataTables_filter">
                                <label>仓库名称:  <input type="search" class="input-sm input-inline" name="name" placeholder="" aria-controls="dataTables-example"></label>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div id="" class="dataTables_filter">
                                <button class="btn btn-primary" >查询</button>
                            </div>
                        </div>
                    </form>
                </div>

        <div class="row">

            <div class="col-lg-12">

                <div class="panel-body">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th>仓库名称</th>
                                    <th>地址</th>
                                    <th>联系人</th>
                                    <th>联系电话</th>
                                    <th>经度</th>
                                    <th>维度</th>
                                    <th>摄像头数量</th>
                                    <th>RFID数量</th>
                                    <th>仓单数量</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>

                                <#if warehouseList??>
                                <#list warehouseList as wh>
                                <tr>
                                    <td>${wh.name}</td>
                                    <td>${wh.address}</td>
                                    <td>${wh.contacts}</td>
                                    <td>${wh.contactsPhone}</td>
                                    <td>${wh.lat?c}</td>
                                    <td>${wh.lng?c}</td>
                                    <td> <a href="${request.getContextPath()}/admin/camera/listByWh.do?whId=${wh.id}" class="btn btn-default">${wh.cameraNumber}</a> </td>
                                    <td> <a href="${request.getContextPath()}/admin/tag/listByWh.do?whId=${wh.id}" class="btn btn-default">${wh.tagNumber}</a> </td>
                                    <td> <a href="${request.getContextPath()}/admin/receipt/listByWh.do?whId=${wh.id}" class="btn btn-default">${wh.receiptNumber}</a> </td>
                                    <td> <a href="${request.getContextPath()}/admin/warehouse/update.do?id=${wh.id}" class="btn btn-primary">编辑</a> </td>
                                </tr>
                                </#list>
                                </#if>

                            </tbody>
                        </table>


                    </div>
                    <!-- /.table-responsive -->
                </div>

            </div>


            <!--分页标记-->
            <div class="col-sm-6">
                <div class="dataTables_info" id="dataTables-example_info" role="status" aria-live="polite">总记录数 ${pager.rowCount} /条 总页数 ${pager.pageCount} / 页</div>
            </div>
            <div class="col-sm-6">
                <div class="dataTables_paginate paging_simple_numbers" id="dataTables-example_paginate">
                    <ul class="pagination">
                        <li class="paginate_button previous" aria-controls="dataTables-example" tabindex="0" id="dataTables-example_previous">
                            <a href="${request.getContextPath()}/admin/warehouse/list.do?page=${pager.pageNo-1}">上一页</a></li>
                        <#list 1..pager.pageCount as index>

                            <#if pager.pageNo == index >
                                <li class="paginate_button active" aria-controls="dataTables-example" tabindex="0">
                                    <a href="${request.getContextPath()}/admin/warehouse/list.do?page=${index}">${index}</a>
                                </li>
                            </#if>
                            <#if pager.pageNo != index >
                                <li class="paginate_button" aria-controls="dataTables-example" tabindex="0">
                                    <a href="${request.getContextPath()}/admin/warehouse/list.do?page=${index}">${index}</a>
                                </li>
                            </#if>

                        </#list>
                        <li class="paginate_button next" aria-controls="dataTables-example" tabindex="0" id="dataTables-example_next">
                            <a href="${request.getContextPath()}/admin/warehouse/list.do?page=${pager.pageNo+1}">下一页</a></li>
                    </ul>
                </div>
            </div>
            <!--end 分页标记-->



        </div>
        <!-- /.row -->
                
                <!-- /.row -->
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->



    <!-- jQuery -->
    <script src="${request.getContextPath()}/public/vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="${request.getContextPath()}/public/vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="${request.getContextPath()}/public/vendor/metisMenu/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="${request.getContextPath()}/public/dist/js/sb-admin-2.js"></script>



</body>

</html>
